﻿<avalondock:DocumentContent x:Class="BOL.Apps.GeneNetworkBrowser.Controls.NetworkDocument"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:wpfex="clr-namespace:WPFExtensions.Controls;assembly=WPFExtensions"
             xmlns:graphsharp="clr-namespace:GraphSharp.Controls;assembly=GraphSharp.Controls"
             xmlns:graphsharpConverters="clr-namespace:GraphSharp.Converters;assembly=GraphSharp.Controls"
             xmlns:avalondock="clr-namespace:AvalonDock;assembly=AvalonDock"
             xmlns:control="clr-namespace:BOL.Apps.GeneNetworkBrowser.Controls"
             xmlns:converters="clr-namespace:BOL.Apps.GeneNetworkBrowser.Converters"
             xmlns:vm="clr-namespace:BOL.Apps.GeneNetworkBrowser.ViewModels"
             Title="{Binding Path=FileName}"
             >
    <avalondock:DocumentContent.Resources>
        <converters:LayoutAlgorithmTypeConverter x:Key="LayoutAlgorithmTypeConverter" />
        <graphsharpConverters:EdgeRouteToPathConverter x:Key="EdgeRouteToPathConverter" />
        <control:VertexShapeDataTemplateSelector x:Key="VertexShapeDataTemplateSelector" />
        
        <SolidColorBrush x:Key="HighlightedVertexBorderBrush" Color="Transparent" />
        <SolidColorBrush x:Key="HighlightedVertexBackgroundBrush" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" />
        <SolidColorBrush x:Key="HighlightedVertexForegroundBrush" Color="{DynamicResource {x:Static SystemColors.ControlLightLightColorKey}}" />
        <SolidColorBrush x:Key="SemiHighlightedSourceVertexBorderBrush" Color="Transparent" />
        <SolidColorBrush x:Key="SemiHighlightedSourceVertexBackgroundBrush" Color="#FF1DBA00" />
        <SolidColorBrush x:Key="SemiHighlightedTargetVertexBorderBrush" Color="Transparent" />
        <SolidColorBrush x:Key="SemiHighlightedTargetVertexBackgroundBrush" Color="#FFD6A51C" />
        <SolidColorBrush x:Key="HighlightedEdgeBrush" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" />
        <SolidColorBrush x:Key="SemiHighlightedInEdgeBrush" Color="#FF1DBA00" />
        <SolidColorBrush x:Key="SemiHighlightedOutEdgeBrush" Color="#FFD6A51C" />

        <Style TargetType="{x:Type graphsharp:VertexControl}">
            <Setter Property="ToolTip">
                <Setter.Value>
                    <TextBlock Text="{Binding Path=FullName}"/>
                </Setter.Value>
            </Setter>
            
            <Setter Property="Background" Value="#FFE3E3E3" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Padding" Value="3" />
            <Setter Property="BorderBrush" Value="#FF393939" />
            
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type graphsharp:VertexControl}">
                        <Grid>
                            <Ellipse Opacity="0.8" x:Name="ellipse" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}" />
                            <!--<Border Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}"
                                CornerRadius="5"
                                x:Name="vertexBorder">-->
                            <ContentPresenter Margin="5" Content="{TemplateBinding Vertex}" MouseLeftButtonDown="VertexMouseLeftButtonDown" />
                            <!--ContentTemplateSelector="{StaticResource SelectVertexTemplate}"/>-->
                           </Grid>
                            <!--<Border.ContextMenu>
                                <ContextMenu>-->
                                    <!--<MenuItem Header="Delete" ToolTip="Choose to delete ..." ToolTipService.ShowOnDisabled="True" CommandParameter="{Binding Path=Self}"/>
                                    <MenuItem Header="Foreach" ToolTip="Choose to enable ..." ToolTipService.ShowOnDisabled="True" CommandParameter="{Binding Path=Self}"/>
                                    <MenuItem Header="Condition" ToolTip="Choose to edit ..." ToolTipService.ShowOnDisabled="True" CommandParameter="{Binding Path=Self}"/>-->
                                    <!--<MenuItem Header="Delete" ToolTip="Choose to delete ..." ToolTipService.ShowOnDisabled="True" Command="{x:Static local:GraphViewModel.DeleteServerScriptToClientScriptCommand}" CommandParameter="{Binding Path=Self}"/>
                                <MenuItem Header="Foreach" ToolTip="Choose to enable ..." ToolTipService.ShowOnDisabled="True" Command="{x:Static local:GraphViewModel.ForeachServerScriptToClientScriptCommand}" CommandParameter="{Binding Path=Self}"/>
                                <MenuItem Header="Condition" ToolTip="Choose to edit ..." ToolTipService.ShowOnDisabled="True" Command="{x:Static local:GraphViewModel.ConditionServerScriptToClientScriptCommand}" CommandParameter="{Binding Path=Self}"/>-->
                                <!--</ContextMenu>
                            </Border.ContextMenu>
                        </Border>-->
                        <ControlTemplate.Triggers>
                            <!--<DataTrigger Binding="{Binding Path=IsSelected}" Value="True">
                                <Setter TargetName="vertexBorder" Property="BorderBrush" Value="Yellow" />
                            </DataTrigger>-->
                            <DataTrigger Binding="{Binding Path=Id}" Value="171023">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                                <!--<Setter TargetName="ellipse" Property="BitmapEffect"><Setter.Value><OuterGlowBitmapEffect GlowSize="20" GlowColor="Yellow" /></Setter.Value></Setter>-->
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="1788">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="2119">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="2322">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="3417">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="3418">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="3815">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="3845">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="4869">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="4893">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="148479">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="158471">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="5781">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="5885">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="861">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="8243">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="9126">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="10735">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="54790">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="7157">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="7307">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="7490">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="1050">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding Path=Id}" Value="11223">
                                <Setter TargetName="ellipse" Property="Stroke" Value="Yellow" />
                                <Setter TargetName="ellipse" Property="StrokeThickness" Value="3" />
                            </DataTrigger>
                            
                            <Trigger Property="graphsharp:GraphElementBehaviour.IsHighlighted" Value="True">
                                <Setter Property="BorderBrush" Value="{StaticResource HighlightedVertexBorderBrush}"/>
                                <Setter Property="Background" Value="{StaticResource HighlightedVertexBackgroundBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource HighlightedVertexForegroundBrush}"/>
                            </Trigger>
                            <Trigger Property="graphsharp:GraphElementBehaviour.IsSemiHighlighted" Value="True">
                                <Setter Property="BorderBrush" Value="{StaticResource HighlightedVertexBorderBrush}"/>
                                <Setter Property="Background" Value="{StaticResource HighlightedVertexBackgroundBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource HighlightedVertexForegroundBrush}"/>
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="graphsharp:GraphElementBehaviour.IsSemiHighlighted" Value="True"/>
                                    <Condition Property="graphsharp:GraphElementBehaviour.SemiHighlightInfo" Value="Source"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="BorderBrush" Value="{StaticResource SemiHighlightedSourceVertexBorderBrush}"/>
                                <Setter Property="Background" Value="{StaticResource SemiHighlightedSourceVertexBackgroundBrush}"/>
                            </MultiTrigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="graphsharp:GraphElementBehaviour.IsSemiHighlighted" Value="True"/>
                                    <Condition Property="graphsharp:GraphElementBehaviour.SemiHighlightInfo" Value="Target"/>
                                </MultiTrigger.Conditions>
                                <Setter Property="BorderBrush" Value="{StaticResource SemiHighlightedTargetVertexBorderBrush}"/>
                                <Setter Property="Background" Value="{StaticResource SemiHighlightedSourceVertexBackgroundBrush}"/>
                            </MultiTrigger>
                            </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


        <Style TargetType="{x:Type graphsharp:EdgeControl}">
            <Setter Property="ToolTip">
                <Setter.Value>
                    <TextBlock Text="{Binding Path=RelationTypes}"/>
                </Setter.Value>
            </Setter>

            <Setter Property="MinWidth" Value="1" />
            <Setter Property="MinHeight" Value="1" />
            <Setter Property="Foreground" Value="#FFF0F0F0" />
            <Setter Property="Opacity" Value="0.5" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type graphsharp:EdgeControl}">
                        <Canvas>
                            <Path
                                Stroke="{TemplateBinding Foreground}" 
                                StrokeThickness="{TemplateBinding StrokeThickness}" 
                                MinWidth="{TemplateBinding MinWidth}" 
                                MinHeight="{TemplateBinding MinHeight}" 
                                Opacity="{TemplateBinding Opacity}"
                                x:Name="edgePath"
                                >
                                <Path.Data>
                                    <PathGeometry>
                                        <PathGeometry.Figures>
                                            <MultiBinding Converter="{StaticResource EdgeRouteToPathConverter}">
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Source.(graphsharp:GraphCanvas.X)" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Source.(graphsharp:GraphCanvas.Y)" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Source.ActualWidth" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Source.ActualHeight" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Target.(graphsharp:GraphCanvas.X)" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Target.(graphsharp:GraphCanvas.Y)" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Target.ActualWidth" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Target.ActualHeight" />
                                                <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="RoutePoints" />
                                            </MultiBinding>
                                        </PathGeometry.Figures>
                                    </PathGeometry>
                                </Path.Data>
                            </Path>
                            <!--<control:EdgeContentPresenter Content="{TemplateBinding Edge}" MouseLeftButtonDown="Edge_MouseLeftButtonDown" />-->
                        </Canvas>
                        <ControlTemplate.Triggers>
                            <DataTrigger Binding="{Binding IsSelected}" Value="True">
                                <Setter TargetName="edgePath" Property="Stroke" Value="Yellow" />
                            </DataTrigger>
                            <Trigger Property="graphsharp:GraphElementBehaviour.IsHighlighted" Value="True">
                                <Setter Property="Foreground" Value="{DynamicResource HighlightedEdgeBrush}" />
                            </Trigger>
                            <Trigger Property="graphsharp:GraphElementBehaviour.IsSemiHighlighted" Value="True">
                                <Setter Property="Foreground" Value="{DynamicResource HighlightedEdgeBrush}" />
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="graphsharp:GraphElementBehaviour.IsSemiHighlighted" Value="True" />
                                    <Condition Property="graphsharp:GraphElementBehaviour.SemiHighlightInfo" Value="InEdge" />
                                </MultiTrigger.Conditions>
                                <Setter Property="Foreground" Value="{DynamicResource SemiHighlightedInEdgeBrush}" />
                            </MultiTrigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="graphsharp:GraphElementBehaviour.IsSemiHighlighted" Value="True" />
                                    <Condition Property="graphsharp:GraphElementBehaviour.SemiHighlightInfo" Value="OutEdge" />
                                </MultiTrigger.Conditions>
                                <Setter Property="Foreground" Value="{DynamicResource SemiHighlightedInEdgeBrush}" />
                            </MultiTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <!--<Setter Property="graphsharp:GraphElementBehaviour.HighlightTrigger" 
                    Value="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}" />-->
            

        <!--<DataTemplate DataType="{x:Type core:Gene}">
            <Border x:Name="vertexBorder">
                <StackPanel ToolTip="{Binding FullName}">
                    <TextBlock Text="{Binding Path=Symbol}">
                        <TextBlock.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Delete" ToolTip="Choose to delete ..." ToolTipService.ShowOnDisabled="True" Command="{x:Static local:GraphViewModel.DeleteServerScriptToClientScriptCommand}" CommandParameter="{Binding Path=Self}"/>
                                <MenuItem Header="Foreach" ToolTip="Choose to enable ..." ToolTipService.ShowOnDisabled="True" Command="{x:Static local:GraphViewModel.ForeachServerScriptToClientScriptCommand}" CommandParameter="{Binding Path=Self}"/>
                                <MenuItem Header="Condition" ToolTip="Choose to edit ..." ToolTipService.ShowOnDisabled="True" Command="{x:Static local:GraphViewModel.ConditionServerScriptToClientScriptCommand}" CommandParameter="{Binding Path=Self}"/>
                            </ContextMenu>
                        </TextBlock.ContextMenu>
                    </TextBlock>
                </StackPanel>
            </Border>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding IsSelected}" Value="True">
                    <Setter TargetName="vertexBorder" Property="BorderBrush" Value="Yellow" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>-->

        <!--<DataTemplate DataType="{x:Type core:Relation}">
            <TextBlock Text="{Binding Path=Source}" MouseLeftButtonDown="Edge_MouseLeftButtonDown" />
        </DataTemplate>-->

        <DataTemplate x:Key="VertexCircleTemplate">
            <Grid>
                <Ellipse Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexEllipseTemplate">
            <Grid>
                <Ellipse Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexRectangleTemplate">
            <Grid>
                <Rectangle Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexSquareTemplate">
            <Grid>
                <Rectangle Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexPentagonTemplate">
            <Grid>
                <Polygon Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexHexagonTemplate">
            <Grid>
                <Polygon Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexHeptagonTemplate">
            <Grid>
                <Polygon Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

        <DataTemplate x:Key="VertexOctagonTemplate">
            <Grid>
                <Polygon Stroke="#FF393939" Fill="#FFE3E3E3" StrokeThickness="1"/>
                <TextBlock Margin="3" Text="{Binding}" FontSize="24" />
            </Grid>
        </DataTemplate>

    </avalondock:DocumentContent.Resources>
    
    <DockPanel>
        <ToolBarPanel DockPanel.Dock="Top" Background="#FFBCC7D8" Height="26" Orientation="Horizontal">
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutBFr">
                <Image Source="/Images/Layout_bFR.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutCircular">
                <Image Source="/Images/Layout_Circular.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutEs">
                <Image Source="/Images/Layout_ES.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutFdp">
                <Image Source="/Images/Layout_FDP.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutFr">
                <Image Source="/Images/Layout_FR.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutIsom">
                <Image Source="/Images/Layout_ISOM.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutKk">
                <Image Source="/Images/Layout_KK.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutLl">
                <Image Source="/Images/Layout_LL.png" Width="16" Height="16" />
            </Button>
            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="22" Height="22" Margin="0,2,0,2" Click="LayoutTree">
                <Image Source="/Images/Layout_Tree.png" Width="16" Height="16" />
            </Button>
        </ToolBarPanel>
        <wpfex:ZoomControl Name="_zoomControl" MouseLeftButtonDown="NetworkGraphLayoutMouseLeftButtonDown">
            <control:NetworkGraphLayout
                        x:Name="_networkGraphLayout"
						Graph="{Binding Network}"
                        LayoutAlgorithmType="{Binding LayoutAlgorithmType, Converter={StaticResource LayoutAlgorithmTypeConverter}}"
						OverlapRemovalAlgorithmType="FSA"
                        HighlightAlgorithmType="Simple"
                        vm:NetworkDocumentViewModel.NetworkGraphLayout="{Binding ElementName=_networkGraphLayout}"
						/>
        </wpfex:ZoomControl>
    </DockPanel>
</avalondock:DocumentContent>